package com.ccb.jyzx.expand.tiantouonline.job;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @ProjectName: extend
 * @Author: jianghaolin
 * @Version: 1.0
 */
@Component
public class TranceJob {

    Logger logger= LoggerFactory.getLogger(this.getClass());

    @Autowired
    private ClassifyJob job;

    /**
     * 每五分钟扫描一次
     */
    @Scheduled(cron = "0 0/5 * * * ?")
    public void scheduled(){
        logger.info("循环扫描转换开始：" + new Date(System.currentTimeMillis()));
        job.trance();
        logger.info("循环扫描转换结束：" + new Date(System.currentTimeMillis()));
    }
}
